package ch.janotta.slawo.da;

import ch.janotta.slawo.utilities.Dice;

public enum Gender {
  FEMALE,
  MALE,
  ;

  public static Gender getRandomInstance() {
    int lastPossibleGender = Gender.values().length;
    int randomNumber = Dice.getRandomNumber(lastPossibleGender);
    int randomGenderIndex =  randomNumber - 1;
    return Gender.values()[randomGenderIndex];
  }
}
